From: Colin Walters Date: Tue, 15 Mar 2011 22:34:51 +0000 (-0400) Subject: ShellApp: Report error when we fail to run an app X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8633 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4bf1df0894f8508d7a9476f7d432534b28930d98;p=gnome-shell.git ShellApp: Report error when we fail to run an app https://bugzilla.gnome.org/show_bug.cgi?id=644402 --- diff --git a/po/POTFILES.in b/po/POTFILES.in index 51303bbf6..17e8a4d31 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -30,6 +30,7 @@ js/ui/workspacesView.js src/gvc/gvc-mixer-control.c src/gdmuser/gdm-user.c src/main.c +src/shell-app.c src/shell-app-system.c src/shell-global.c src/shell-mobile-providers.c diff --git a/src/shell-app.c b/src/shell-app.c index 9ffe85654..b27ebe6ba 100644 --- a/src/shell-app.c +++ b/src/shell-app.c @@ -4,6 +4,8 @@ #include +#include + #include #include "shell-app-private.h" @@ -427,13 +429,24 @@ shell_app_activate (ShellApp *app, switch (app->state) { case SHELL_APP_STATE_STOPPED: - /* TODO sensibly handle this error */ - shell_app_info_launch_full (app->info, - 0, - NULL, - workspace, - NULL, - NULL); + { + GError *error = NULL; + if (!shell_app_info_launch_full (app->info, + 0, + NULL, + workspace, + NULL, + &error)) + { + char *msg; + msg = g_strdup_printf (_("Failed to launch '%s'"), shell_app_get_name (app)); + shell_global_notify_error (shell_global_get (), + msg, + error->message); + g_free (msg); + g_clear_error (&error); + } + } break; case SHELL_APP_STATE_STARTING: break;